function [val, acc, decv] = ldapredict(lbl, inst, model)
    decv = inst * model.space - model.threshold;
    if model.ab
        val = decv > 0;
    else
        val = decv < 0;
    end
    acc = sum(val == lbl) / length(lbl);
end